﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;


namespace STLGROUP.Layers.DataAccessLayers
{
    public partial class DT_NhaCungCap
    {
        public Image TrackingState
        {
            get
            {
                Image img = null;
                switch (this.EntityState)
                {
                    case System.Data.EntityState.Added:
                    case System.Data.EntityState.Detached:
                        img = (Image)Properties.Resources.status_added;
                        img.Tag = STLGROUP.Layers.Common.StructsEnums.EnumEntityState.Added;
                        break;
                    case System.Data.EntityState.Deleted:
                        img = (Image)Properties.Resources.status_deleted;
                        img.Tag = STLGROUP.Layers.Common.StructsEnums.EnumEntityState.Deleted;
                        break;
                    case System.Data.EntityState.Unchanged:
                        img = (Image)Properties.Resources.status_unchanged;
                        img.Tag = STLGROUP.Layers.Common.StructsEnums.EnumEntityState.Unchanged;
                        break;
                    case System.Data.EntityState.Modified:
                        img = (Image)Properties.Resources.status_modified;
                        img.Tag = STLGROUP.Layers.Common.StructsEnums.EnumEntityState.Modified;
                        break;
                }

                return img;
            }
        }
    }
}
